package com.plian.system.wrapper.hr.recruitment;

import com.plian.system.dto.hr.recruitment.RecruitmentManagementChildDTO;
import com.plian.system.entity.hr.recruitment.RecruitmentManagementChild;
import com.plian.system.mybatis.support.BaseWrapper;
import com.plian.system.vo.hr.recruitment.RecruitmentManagementChildVO;
import com.plian.system.wrapper.util.CacheWrapperUtil;
import com.plian.system.wrapper.util.WrapperUtil;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import static com.plian.system.wrapper.util.WrapperConstant.SPRING;
import static com.plian.system.wrapper.util.WrapperConstant.USER_ID_TO_NAME;

/**
 * 招聘管理子表包装类,返回视图层所需的字段
 *
 * @author gangan
 * @since 2019-11-15
 */
@Mapper(componentModel = SPRING, uses = {CacheWrapperUtil.class, WrapperUtil.class})
public interface RecruitmentManagementChildWrapper extends BaseWrapper<RecruitmentManagementChild, RecruitmentManagementChildDTO, RecruitmentManagementChildVO> {

	@Override
	@Mappings(value = {
			@Mapping(source = "createUser", target = "createUserName", qualifiedByName = USER_ID_TO_NAME)
	})
	RecruitmentManagementChildVO entityToVO(RecruitmentManagementChild entity);

}
